package com.bcmusic.file.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;

/**
 * 用于文件传输的feign调用
 * @author yg
 */
@FeignClient("file")
@RequestMapping("/file")
public interface FileFeign {
    @PostMapping(value = "/upload",consumes = "multipart/form-data")
    public String upload(@RequestPart("file") MultipartFile file);

    @PostMapping(value = "/uploadOpernFile",consumes = "multipart/form-data")
    public String uploadOpernFile(@RequestPart("opernFile")MultipartFile opernFile);

    @PostMapping(value = "/uploadLyricsFile",consumes = "multipart/form-data")
    public String uploadLyricsFile(@RequestPart("lyricsFile")MultipartFile lyricsFile);

    @PostMapping(value = "/uploadMusicFile",consumes = "multipart/form-data")
    public String uploadMusicFile(@RequestPart("musicFile")MultipartFile musicFile);
}
